package com.crm.service.impl;

import com.crm.domain.entity.Permissions;
import com.crm.mapper.PermissionsMapper;
import com.crm.service.PermissionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 权限业务层实现类
 */

@Service
public class PermissionsServiceImpl implements PermissionsService {

    @Autowired
    private PermissionsMapper permissionMapper;

    @Override
    public Integer addPermission(Permissions permissions) {
        return permissionMapper.addPermission(permissions);
    }

    @Override
    public Boolean deletePermissionByRoleId(Integer roleId) {
        return permissionMapper.deletePermissionByRoleId(roleId) > 0;
    }
}
